//
//  XMGAppDelegate.m
//  XMGFMMain
//
//  Created by 王顺子 on 11/09/2016.
//  Copyright (c) 2016 王顺子. All rights reserved.
//

#import "XMGAppDelegate.h"
#import "MGJRouter.h"
#import "TestVC.h"

@implementation XMGAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    UIViewController *rootVC = [MGJRouter objectForURL:@"miwei://getRootVC"];
    
    
    [MGJRouter openURL:@"miwei://addChildVC" withUserInfo:@{
                                                          @"vc": [TestVC new],
                                                          @"nImg": @"tabbar_home",
                                                          @"sImg": @"tabbar_home_highlighted",
                                                          @"title": @"首页"
                                                          } completion:^(id result) {
                                                              NSLog(@"%@", result);
                                                          }];

    [MGJRouter openURL:@"miwei://addChildVC" withUserInfo:@{
                                                            @"vc": [TestVC new],
                                                            @"nImg": @"tabbar_live",
                                                            @"sImg": @"tabbar_live_highlighted",
                                                            @"title": @"直播"
                                                            } completion:^(id result) {
                                                                NSLog(@"%@", result);
                                                            }];
    
    [MGJRouter openURL:@"miwei://addChildVC" withUserInfo:@{
                                                            @"vc": [TestVC new],
                                                            @"nImg": @"tabbar_home",
                                                            @"sImg": @"tabbar_home_highlighted",
                                                            @"title": @"首页"
                                                            } completion:^(id result) {
                                                                NSLog(@"%@", result);
                                                            }];
    
    self.window.rootViewController = rootVC;
    [self.window makeKeyAndVisible];
    return YES;
}

@end
